/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package command.mac;

import command.Command;

import config.Settings;

/**
 * 
 * @author Yang Wang <yang@digitalmenubox.com>
 */
public class setTransferType implements Command {

	@Override
	public void execute(String[] args) {
		if (args != null && args.length > 0) {
			if (args[0].equalsIgnoreCase("FTP")) {
				Settings.setConnectionType(Settings.FTP_CONNECTION);
			} else {
				Settings.setConnectionType(Settings.HTTP_CONNECTION);
			}
			Settings.save();
		}
	}

}
